package com.lehecai.ucenter.service.permission;

import com.lehecai.ucenter.dao.QueryParam;
import com.lehecai.ucenter.entity.app.App;
import com.lehecai.ucenter.entity.permission.Role;
import com.lehecai.ucenter.entity.permission.User;
import com.lehecai.ucenter.entity.permission.UserApp;
import com.lehecai.ucenter.entity.permission.UserRole;

import java.util.List;
import java.util.Map;

public interface UserService {
	public User login(String userName, String password);
	public User update(User user);
	public List<User> findList(QueryParam queryParam);
	public User findByUsername(String username);
	public User get(Long id);
	public void delete(User user);
	
	public UserRole findUserRoleByUser(User user);
	public Role findRoleByUser(User user);
	public void update(UserRole userRole);
	
	public List<App> findAppsByUser(User user);
	public void manage(UserApp userApp);
	public void del(UserApp userApp);

    public Map<Long, Role> getUserRoleMap();
}